package Easy;

//867.转置矩阵
public class Solution867 {

    public int[][] transpose(int[][] A) {
        //row col指的是返回值res的行和列
        int row = A[0].length;
        int col = A.length;
        int[][]res = new int[row][col];
        for(int i = 0 ; i < A.length ; i++){
            for(int j = 0 ; j < A[0].length ; j++){
                res[j][i] = A[i][j];
            }
        }
        return res;
    }

}
